package com.jindianjichi.auth.common.enums;

import lombok.Getter;

@Getter
public enum StatusEnum {
    OPEN(0,"启用"),
    UN_DELETED(1,"禁用");
    public int code;
    public String desc;
    StatusEnum(int code, String desc){
        this.code=code;
        this.desc=desc;
    }
    public static StatusEnum getByCode(int codeVal){
        for(StatusEnum resultCodeEnum : StatusEnum.values()){
            if(resultCodeEnum.code == codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }

}
